{include file="$temps.head" title="$webs.title" keywords="$webs.keywords" description="$webs.description" /}
<section class="layout bg-fff">
    {volist name="partlist" id="cx" empty=""}
    {if condition="($cx.mid == $lagpart.mid) AND ($cx.pid == 0)"}
    <div class="layout cx-fex-c cx-fixed">
        {eq name="$cx.class" value="0"}
        {volist name="partlist" id="c" empty=""}
        {eq name="$c.pid" value="$cx.id"}
        <a class="pingtuang-nav t-16 {eq name='$c.id' value='$parts.id'}alick{/eq}" title="{$c.title}" href="{:url('Part/index',array('fid'=>$c.id))}">{$c.title}</a>
        {/eq}
        {/volist}
        {/eq}
    </div>
    {/if}
    {/volist}
</section>
{cxbs:tuangoulist name="tuangou" listdb="tg_listdb" nums="24"}
<section class="layout cx-fex-c">
    <ul class="layout cx-fex-l">
        {volist name="tg_listdb" id="cx" empty=""}
        <li class="xl6 fex-column in-tuangou-lik pad-a5">
            <a class="layout" href="{:url('Article/index',array('aid'=>$cx.aid))}">
            <div class="layout bg-fff">
                <div class="layout in-tuangou-imgl pos-r">
                    {neq name="cx.pinimg" value="0"}
                    <div class="img-auto in-tuangou-imgk pos-a">
                        <div class="zoomImages" style="background-image: url('{$cx.pinimg}')"></div>
                    </div>
                    {else /}
                    <div class="img-auto in-tuangou-imgk pos-a">
                        <div class="zoomImages" style="background-image: url('{$cx.picurl}')"></div>
                    </div>
                    {/neq}
                </div>
                <div class="layout pad-a5 fex-column in-tuangou-content">
                    <h3 class="t-14">{:get_word($cx.title,20)}</h3>
                    <div class="dtimes t-12 t-gray" data-times="{$cx.jietims}"><i class="cx-icon cx-icon-shijian mr-5"></i><span></span></div>
                    <div class="t-gray">
                        <div class="layui-progress">
                            <div class="layui-progress-bar layui-bg-red" lay-percent="{$cx['addnum'] / $cx['rennum']*100}%"></div>
                        </div>
                        <span class="t-red t-12">{$cx['addnum']}</span> 人已{eq name="$cx.pinclass" value="正常团"}付款{else /}报名{/eq}
                    </div>
                    <div class="in-tuangou-jia cx-fex">
                        <div class="t-14 t-gray" style="text-decoration:line-through"><i class="cx-icon cx-icon-renminbi1688"></i> {$cx.shichangjia}</div>
                        <div class="in-tuangou-jiah t-14 t-red"><i class="cx-icon cx-icon-renminbi1688"></i> <span class="t-18">{$cx.pinmoney}</span></div>
                    </div>
                    <div class="pad-b10 cx-fex-c">
                        {eq name="$cx.addnum" value="$cx.rennum"}
                        <a class="button button-S">已满团</a>
                        {else /}
                        <span class="button button-S bg-yellow">马上参团</span>
                        {/eq}
                    </div>
                </div>
            </div>
            </a>
        </li>
        {/volist}
    </ul>
    <div class="pad-a10 cx-fex-c">
       {$pages}
    </div>
</section>
{/cxbs:tuangoulist}
<div style="width:100%;height: 60px"></div>
<script>
    $('.dtimes').each(function () {
        var d = $(this);
        var t = d.data();
        layui.use('util', function(){
            var layutil = layui.util;
            var serverTime = new Date().getTime(),
                ktime = t.times * 1000;
            layutil.countdown(ktime, serverTime, function(date, serverTime, timer){
                var str = date[0] + '天' + date[1] + '时' +  date[2] + '分' + date[3] + '秒';
                $(d).find('span').text('仅剩：'+ str);
            });
        });
    });
    layui.use('element', function(){
        var element = layui.element;
    });
</script>
{include file="$temps.foot" /}